package com.coolingme.message;

/**
 * 桥接抽象角色
 *
 * @author wangyue
 * @date 2020-09-20 21:21
 */
public abstract class AbstractMessage {

    protected IMessage message;

    public AbstractMessage(IMessage message) {
        this.message = message;
    }

    /**
     * 委派给实现
     *
     * @param content 内容
     * @param to      接收人
     */
    public void sendMessage(String content, String to) {
        this.message.sendMessage(content, to);
    }

}
